package personal.service.accounting;

import java.util.List;

import personal.domain.accounting.Account;
import personal.domain.accounting.AccountType;
import personal.domain.accounting.MonthendAccountBalance;


public interface AccountService {
	/**
	 * Returns all accounts in the database.
	 * @return List<Account>.
	 */
	public List<Account> getAllAccounts();
	/**
	 * Returns all account types in the database.
	 * @return List<AccountType>.
	 */
	public List<AccountType> getAllAccountTypes();
	/**
	 * Finds month end balances across all accounts for a given year
	 * @param year
	 * @return List<MonthendAccountBalance>
	 */
	public List<MonthendAccountBalance> getMonthendAccountBalancesForYear(Long year);
	/**
	 * Saves (insert or update) an account.
	 * @param account. Account to be saved.
	 * @return Account - Saved account with generated account id (for inserts).
	 */
	public Account saveAccount(Account account);
	/**
	 * Saves (insert or update) an account type.
	 * @param accountType. Account type to be saved.
	 * @return AccountType - Saved account type with generated account id (for inserts).
	 */
	public AccountType saveAccountType(AccountType accountType);
}
